package com.atguigu.gmall.product;

import com.atguigu.gmall.common.config.Swagger2Config;
import com.atguigu.gmall.common.config.minio.MinioAutoConfiguration;
import com.atguigu.gmall.common.config.minio.annotation.EnableMinio;
import com.atguigu.gmall.common.config.minio.config.MinioConfiguration;
import com.atguigu.gmall.common.config.minio.propertie.MinioProperties;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.SpringCloudApplication;
import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Import;

/*@EnableCircuitBreaker//熔断
@EnableDiscoveryClient//服务注册可以被发现
@SpringBootApplication*/
@SpringCloudApplication//上面三个注解合为一个，这是一个cloud服务，自动开始服务发现，服务熔断的功能
@MapperScan(basePackages = "com.atguigu.gmall.product.mapper")
//主程序只扫描启动类所在包及其子包下的类
//主程序 com.atguigu.gmall.product
//Swagger2Config com.atguigu.gmall.common.config
//minio com.atguigu.gmall.common.config.minio
//@Import({Swagger2Config.class, MinioProperties.class, MinioConfiguration.class})
@Import({Swagger2Config.class})
@EnableMinio//开启minio功能
@EnableFeignClients(basePackages = {"com.atguigu.gmall.feign.search"})//开启feign客户端远程调用，用哪个就写哪个
public class ProductApplication {
    public static void main(String[] args) {
        SpringApplication.run(ProductApplication.class, args);
    }
}
